//
//  HomeTongueComView.m
//  Ginix
//
//  Created by 冯志强 on 2025/2/23.
//

#import "HomeTongueComView.h"

@interface HomeTongueComView()
@property (nonatomic,strong) UIView * bgview;
@property (nonatomic,strong) UIView * line;
@property (nonatomic,strong) UILabel * nameLabel;
@end

@implementation HomeTongueComView

-(instancetype)initWithFrame:(CGRect)frame{
    
    if (self = [super initWithFrame:frame]) {
        [self setSubViewLayout];
    }
    return self;
}
-(void)setSubViewLayout{
    
    [self addSubview:self.bgview];
    [_bgview mas_makeConstraints:^(MASConstraintMaker *make) {
        make.size.mas_offset(CGSizeMake(300 * FMScaleX, 21 * FMScaleX));
        make.center.equalTo(@0);
    }];
    [self.bgview addSubview:self.line];
    [_line mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.bottom.equalTo(@0);
        make.width.mas_offset(3 * FMScaleX);
    }];
    [self.bgview addSubview:self.nameLabel];
    [_nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.line.mas_right).offset(8 * FMScaleX);
        make.centerY.equalTo(@0);
    }];
}
-(UIView *)bgview{
    
    if (!_bgview) {
        _bgview = [[UIView alloc]init];
        _bgview.backgroundColor = RDRGB(0xF5F2ED);
    }
    return _bgview;
}
-(UIView *)line{
    
    if (!_line) {
        _line = [[UIView alloc]init];
        _line.backgroundColor = RDRGB(0xAD7D62);
    }
    return _line;
}

-(UILabel *)nameLabel{
    
    if (!_nameLabel) {
        _nameLabel = [[UILabel alloc]init];
        _nameLabel.font = Bold(15);
        _nameLabel.textColor = RDRGB(0xAD7D62);
    }
    return _nameLabel;
}
@end
